﻿using System;
using System.ComponentModel.DataAnnotations;
using CodeContrib.Data.Entity;

namespace CodeContribBlog.Data
{
	[MetadataType(typeof (CommentMetadata))]
	public class Comment : Entity
	{
		public string Author { get; set; }
		public string Body { get; set; }
		public int CommenterId { get; set; }
		public DateTime CreatedAt { get; set; }
		public string EmailAddress { get; set; }
		public bool IsSpam { get; set; }
		public virtual Post Post { get; set; }
		public int PostId { get; set; }
		public string Url { get; set; }
		public string UserAgent { get; set; }
		public string UserHostAddress { get; set; }

		public Comment()
		{
			CreatedAt = DateTime.UtcNow;
		}
	}
}